/*
 * @Author: your name
 * @Date: 2021-10-21 19:22:19
 * @LastEditTime: 2021-10-22 09:23:21
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \Vuec:\Users\86131\Desktop\project\payforknowledge\src\store\register\index.js
 */
import { registerApi } from "../../utils/api";

const registerModule = {
  states: {
    status: "",
  },
  mutations: {
    changeRegister(state, payload) {
      state.status = payload.status;
    },
  },
  actions: {
    async getRegister({ commit }, payload) {
      const res = await registerApi({
        phone: payload.phone,
        templateId: payload.templateId,
      });
      commit("changeRegister", res);
    },
  },
};

export default registerModule;
